﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microsoft.Practices.Unity;
using ThisIsFirstTest.Models;
using MealBooking.Core;
using MealBooking.Core.Models.Accounts;

namespace ThisIsFirstTest.Controllers.HomeController
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
        [Authorize]
        public ActionResult Home()
        {
            var account = CoreService.AccountService.AccountDetail(new Account { Id = User.Identity.Name });
            var todayOrder = CoreService.OrderService.UserTodayOrder(account.Id);
            ViewBag.Account = account;
            ViewBag.TodayOrder = todayOrder;
            return PartialView();
        }
    }
}
